#include <ClanLib/core.h>
#include <ClanLib/application.h>
#include <ClanLib/display.h>
#ifdef USE_SDL
	#include <ClanLib/sdl.h>
#else
	#include <ClanLib/gl.h>
#endif
#include "viewportManager.h"

// ViewportManager

ViewportManager::ViewportManager()
{
}

ViewportManager::~ViewportManager()
{
}

void ViewportManager::draw(Level &level, EntityManager &en_manager, ParralaxManager &pa_manager)
{
	std::list<Viewport>::iterator it;

	for(it = viewports.begin() ; it != viewports.end() ; it++ )
	{
	        it->update();
		pa_manager.draw(*it);
	        level.draw(*it);
		en_manager.draw(*it, level);
	}
}

void ViewportManager::add()
{
	Viewport view;

	viewports.push_back(view);
}

void ViewportManager::add(Viewport& view)
{
	viewports.push_back(view);
}


void ViewportManager::clear()
{
	viewports.clear();
}
